package com.songxh.facade.controller;

import com.songxh.application.api.RegisterService;
import com.songxh.application.dto.RegisterInfoDTO;
import com.songxh.application.dto.RegisterParamDTO;
import com.songxh.core.base.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author songxh
 * @create 2023-01-04-11:21
 */
@RestController
@RequestMapping("/gra/songxh/register")
public class RegisterController {

    @Autowired
    private RegisterService registerService;

    @PostMapping("/register")
    public CommonResult<RegisterInfoDTO> register(@RequestBody RegisterParamDTO registerParamDTO){
        return CommonResult.success(registerService.register(registerParamDTO));
    }
}
